define(
	[	 	
	appBasePath + '/scripts/module.js',
	appBasePath + '/scripts/common/http.js',
	],
	function(substanceModule){
		substanceModule.factory('Substance.GoodsApplyService', [
		    '$q',
			'Demo.HttpService',			
		    function($q, httpService) {
	       	    return {
	       	    	applyGoods : function(id, count, data) {
						return httpService.post(appBasePath + '/apply/' + id + "/" + count, data);
					},
					
					list : function(type, data) {
						return httpService.post(appBasePath + '/apply/list/' + type, data);
					},
					
					setApproval: function(id, data) {
						return httpService.post(appBasePath + '/apply/approval/' + id, data);
					},
					
					storeout: function(id, data) {
						
						return httpService.post(appBasePath + '/apply/storeout/' + id, data || {});
					},
					
					applylist: function(data) {
						
						return httpService.post(appBasePath + '/apply/applylist', data);
					},
					storeInRecordslist: function(data) {
						return httpService.post(appBasePath + '/apply/storeInRecords', data);
					},
					
					userApplyList: function(data) {
						return httpService.post(appBasePath + '/apply/userApplyList', data);
					},
					userApplyingList: function(data) {
						return httpService.post(appBasePath + '/apply/userApplyingList', data);
					},
					userApprovedList: function(data) {
						return httpService.post(appBasePath + '/apply/userApprovedList', data);
					},
				};
			}
		]);
	}
);